﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ImbaTracker.Models.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Details</h2>

    <p>

        <%: Html.ActionLink("Edit", "Edit", new { id=Model.Id }) %> |
        <%: Html.ActionLink("Back to List", "Index") %>
    </p>

    <fieldset>
        <legend>Fields</legend>
        
        <div class="display-label">Id:</div>
        <div class="display-field"><%: Model.Id %></div>
        <hr>
        <div class="display-label">Login:</div>
        <div class="display-field"><%: Model.Login %></div>
        <hr>
        <div class="display-label">Name:</div>
        <div class="display-field"><%: Model.Name %></div>
        <hr>
        
    </fieldset>

    Projects, user participate in:

    <table>
        <tr>
        <% foreach (var item in Model.Projects) { %>
                <td> <%: item.Id %> </td>
                <td> <%: item.Name %> </td>
        <% } %>
        </tr>
    </table>

    Projects, owned by user:

    <table>
        <tr>
        <% foreach (var item in Model.OwnedProjects) { %>
                <td> <%: item.Id %> </td>
                <td> <%: item.Name %> </td>
        <% } %>
        </tr>
    </table>
</asp:Content>

